import java.net.ServerSocket;

import util.SocketManager;


public class Servidor{

	public static void metodo1(){
		try{
			ServerSocket welcomeSocket = new ServerSocket(6966);
			System.out.println("Esto funciona...");
			SocketManager sm = new SocketManager(welcomeSocket.accept());
		    String s = (String) sm.Leer();
		    if(s.equals("xxx")){	
		    	sm.Escribir("34"+'\n');
		    }else{
		    	sm.Escribir("W"+'\n');	
		    }			    
		}catch(Exception ex){
			System.err.println("main: "+ex);
			ex.printStackTrace();
        }
	}
	
	
	public static void main (String [] args){
		metodo1();
	}
	
}